<template>
  <div class="box">
    <el-card>
      <div class="header">
        <el-input v-model="input" placeholder="输入道路名称"></el-input>
        <div class="img">
          <img src="@/assets/images/u87.svg" alt="" @click="imgu87" />
          <img src="@/assets/images/u86.svg" alt="" />
          <img src="@/assets/images/u88.svg" alt="" />
          <img src="@/assets/images/u89.svg" alt="" />
          <el-button size="mini" @click="btn">返回</el-button>
        </div>
      </div>
      <div class="content">
        <el-table
          :data="tableData"
          style="width: 100%; border-radius: 10px; height: 815px"
          border
        >
          <el-table-column type="selection" width="116" align="center" />
          <el-table-column prop="index" label="序号" align="center" width="116">
          </el-table-column>
          <el-table-column prop="roadname" label="资金来源" align="center">
          </el-table-column>
          <el-table-column prop="street" label="年度" align="center">
          </el-table-column>
          <el-table-column prop="height" label="下发资金额度" align="center">
          </el-table-column>
          <el-table-column prop="width" label="账上资金" align="center">
          </el-table-column>
          <el-table-column prop="width1" label="支付比例" align="center">
          </el-table-column>
          <el-table-column prop="width2" label="剩余支付资金" align="center">
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div>
      <el-dialog
        title="新增资金信息"
        :visible.sync="dialogVisible"
        :before-close="handleClose"
        :show-close="false"
      >
        <el-form :inline="true">
          <el-form-item label="*资金来源">
            <el-select v-model="value" placeholder="输入资金来源">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
            <div class="line"></div>
          </el-form-item>
          <el-form-item label="*年度">
            <el-input placeholder="输入年度"></el-input>
          </el-form-item>
          <el-form-item label="*下发资金额度">
            <el-input placeholder="输入下发资金额度"></el-input>
          </el-form-item>
          <el-form-item label="*账上资金">
            <el-input placeholder="输入账上资金"></el-input>
          </el-form-item>
        </el-form>
        <div class="dialog-footer">
          <el-button type="primary" @click="handleConfirm">提交</el-button>
          <el-button @click="dialogVisible = false">取 消</el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [
        {
          index: "1",
          roadname: "专项债",
          street: "2024年",
          height: "300",
          width: "300",
          width1: "100%",
          width2: "0",
        },
        {
          index: "2",
          roadname: "区政府",
          street: "2024年",
          height: "300",
          width: "300",
          width1: "100%",
          width2: "0",
        },
        {
          index: "3",
          roadname: "企业自筹",
          street: "2024年",
          height: "300",
          width: "300",
          width1: "100%",
          width2: "0",
        },
      ],
      input: "",
      dialogVisible: false,
      options: [
        {
          value: "选项1",
          label: "专项债",
        },
        {
          value: "选项2",
          label: "区政府",
        },
        {
          value: "选项3",
          label: "企业自筹",
        },
      ],
      value: "",
    };
  },
  methods: {
    imgu87() {
      console.log(111);
      this.dialogVisible = true;
    },
    handleConfirm() {
      this.dialogVisible = false;
    },
    handleClose() {},
    btn() {
      this.$router.push("index");
    },
  },
};
</script>
<style lang="scss" scoped>
.box {
  // .el-card {
  //   height: 965px;
  // }
  .header {
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .el-input {
      width: 50%;
    }
    .img {
      width: 200px;
      display: flex;
      justify-content: space-between;
      .el-button {
        background-color: rgb(178, 178, 179);
        color: #ffffff;
      }
    }
    ::v-deep .el-input__inner {
      width: 300px;
      height: 44px;
      border-radius: 10px;
      font-size: 14px;
      border-width: 1px;
      border-style: solid;
      border-color: rgba(215, 215, 215, 1);
    }
    .content {
      height: calc(100% - 60px);
    }
  }
  ::v-deep .el-dialog {
    width: 781px;
    height: 400px;
    border-radius: 20px;
    background-color: #f6f9fb;
    border: none;
    .el-dialog__title {
      font-weight: 650;
      font-size: 20px;
      display: flex;
      justify-content: center;
    }
    .el-form {
      margin-left: 60px;
      .el-form-item__label {
        margin-left: 8px;
        margin-top: -10px;
      }
      .el-form-item {
        width: 310px;
        .el-input__inner {
          width: 300px;
          height: 44px;
          border-radius: 10px;
        }
      }
      .line {
        border-bottom: 1px solid red;
        width: 240px;
        margin-left: 30px;
      }
    }
    .dialog-footer {
      display: flex;
      justify-content: center;
      margin-top: 30px;
      > button:nth-of-type(1) {
        width: 633px;
        height: 54px;
        border-radius: 10px;
        position: absolute;
        bottom: 40px;
      }
      > button:nth-of-type(2) {
        width: 83px;
        height: 36px;
        border-radius: 10px;
        position: absolute;
        right: 15px;
        top: 15px;
      }
    }
  }
}
</style>
